|
A WHERE clause in SQL specifies that a SQL Data Manipulation Language (DML) statement should only affect rows that meet specified criteria. The criteria are expressed in the form of predicates. WHERE clauses are not mandatory clauses of SQL DML statements, but can be used to limit the number of rows affected by a SQL DML statement or returned by a query. In brief SQL WHERE clause is used to extract only those results from a SQL statement, such as: SELECT, INSERT, UPDATE, or DELETE statement.==Overview== WHERE is an SQL reserved word.The WHERE clause is used in conjunction with SQL DML statements, and takes the following general form:all rows for which the predicate in the WHERE clause is True are affected (or returned) by the SQL DML statement or query. Rows for which the predicate evaluates to False or Unknown (NULL) are unaffected by the DML statement or query.The following query returns only those rows from table ''mytable'' where the value in column ''mycol'' is greater than 100. The following DELETE statement removes only those rows from table ''mytable'' where the column ''mycol'' is either NULL or has a value that is equal to 100.抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「Where (SQL)」の詳細全文を読む スポンサード リンク
|